package game.main;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

public class NomearPlayersActivity extends Activity {
	private TextView player1;
	private TextView player2;
	private Button btnIniciar;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_nomear_players);

		player1 = (TextView) findViewById(R.id.edPlayer1);
		player2 = (TextView) findViewById(R.id.edPlayer2);
		btnIniciar = (Button) findViewById(R.id.btnIniciar);

		btnIniciar.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				GameActivity.player1 = player1.getText().toString();
				GameActivity.player2 = player2.getText().toString();
				startActivity(new Intent(NomearPlayersActivity.this, GameActivity.class));
				NomearPlayersActivity.this.finish();
			}
		});
	}
}
